#ifndef _PYTHONERRORHANDLER_H_
#define _PYTHONERRORHANDLER_H_
#include <QDebug>
#include "JavaCC.h"
#include "Token.h"

class PythonGrammar30;

class PythonErrorHandler: public QObject
{
    Q_OBJECT
public:
    PythonErrorHandler();
    virtual ~PythonErrorHandler();
    
    virtual void handleUnexpectedToken(int /*expectedKind*/, const QString& expectedToken, const TokenPtr& actual, PythonGrammar30 */*parser*/);
    virtual void handleParseError(const TokenPtr&/*last*/, const TokenPtr& unexpected, const JAVACC_STRING_TYPE & production, PythonGrammar30 */*parser*/);
    virtual int getErrorCount();
signals:
    void error(const QString msg, int line, int col);
protected:
    int _errorCount;
};

#endif
